import config from '@/config';
import RequestBase from '@/utils/request.js';

const baseRequest = new RequestBase(config.safetyUrl);
const request = new RequestBase(config.baseUrl)
// 新增装卸
export function addLoadOperation(data) {
	return baseRequest.post('/mobile/bsci/add/dock/create', data)
}

// 可选装运物种列表
export function getChemicalList() {
	return baseRequest.get('/mobile/bsci/add/dock/form/box')
}

// 表单详情
export function getFormDetail(query) {
	return baseRequest.get('/mobile/bsci/add/dock/form/project', query)
}

// 任务详情
export function getLoadOperationDetail(id) {
	return baseRequest.get(`/mobile/bsci/dock/work/detail/${id}`)
}

// 修改装卸任务
export function updateLoadOperation(data) {
	return baseRequest.put('/mobile/bsci/dock/work/update', data)
}

// 获取二级部门
export function getSecondDept() {
	return request.get('/system/dept/list?parentId=1')
}